package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the QUESTION_HHY database table.
 * 
 */
@Entity
@Table(name="QUESTION_HHY")
@NamedQuery(name="QuestionHhy.findAll", query="SELECT q FROM QuestionHhy q")
public class QuestionHhy implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="QUESTION_HHY_QUESHHYID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="QUESTION_HHY_QUESHHYID_GENERATOR")
	@Column(name="QUES_HHY_ID")
	private long quesHhyId;

	@Column(name="QUES_HHY_FENZHI")
	private BigDecimal quesHhyFenzhi;

	@Column(name="QUES_HHY_NAME")
	private String quesHhyName;

	@Column(name="QUES_HHY_NUMBER")
	private BigDecimal quesHhyNumber;

	//bi-directional many-to-many association to ExamPaper
	@ManyToMany
	@JoinTable(
		name="RELATIONSHIP_116"
		, joinColumns={
			@JoinColumn(name="QUES_HHY_ID")
			}
		, inverseJoinColumns={
			@JoinColumn(name="EP_ID")
			}
		)
	@JSONField(serialize=false)
	private List<ExamPaper> examPapers;

	//bi-directional many-to-one association to QuestionType
	@ManyToOne
	@JoinColumn(name="TEST_QUESTIONS")
	private QuestionType questionType;

	public QuestionHhy() {
	}

	public long getQuesHhyId() {
		return this.quesHhyId;
	}

	public void setQuesHhyId(long quesHhyId) {
		this.quesHhyId = quesHhyId;
	}

	public BigDecimal getQuesHhyFenzhi() {
		return this.quesHhyFenzhi;
	}

	public void setQuesHhyFenzhi(BigDecimal quesHhyFenzhi) {
		this.quesHhyFenzhi = quesHhyFenzhi;
	}

	public String getQuesHhyName() {
		return this.quesHhyName;
	}

	public void setQuesHhyName(String quesHhyName) {
		this.quesHhyName = quesHhyName;
	}

	public BigDecimal getQuesHhyNumber() {
		return this.quesHhyNumber;
	}

	public void setQuesHhyNumber(BigDecimal quesHhyNumber) {
		this.quesHhyNumber = quesHhyNumber;
	}

	public List<ExamPaper> getExamPapers() {
		return this.examPapers;
	}

	public void setExamPapers(List<ExamPaper> examPapers) {
		this.examPapers = examPapers;
	}

	public QuestionType getQuestionType() {
		return this.questionType;
	}

	public void setQuestionType(QuestionType questionType) {
		this.questionType = questionType;
	}

}